package com.internship.service;


import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.internship.dao.ProfessionInfoDao;
import com.internship.model.ProfessionInfo;
import com.internship.page.Page;

@Service
public class ProfessionInfoService {
	private final int PAGE_SIZE = 10;
	@Autowired
	private ProfessionInfoDao professionInfoDao;

	public Page<ProfessionInfo> getProfessionInfoList(String SSXSXYDM,String ZYMC,int pageNumber) {
		Page<ProfessionInfo> page = new Page<ProfessionInfo>(pageNumber, PAGE_SIZE);
		List<ProfessionInfo> list = professionInfoDao.getProfessionInfoList(SSXSXYDM, ZYMC, page);
		page.setResultList(list);
		return page;
	}
	public List<ProfessionInfo> getProfessionInfoList() {
		List<ProfessionInfo> list = professionInfoDao.getProfessionInfoList();
		return list;
	}
	public List<ProfessionInfo> getProfessionInfo(String SSXSXYDM) {
		List<ProfessionInfo> list = professionInfoDao.getProfessionInfo(SSXSXYDM);
		return list;
	}
	public int addProfessionInfo(ProfessionInfo professionInfo) {
		return professionInfoDao.addProfessionInfo(professionInfo);
	}
	public int updateProfessionInfo(ProfessionInfo professionInfo) {
		return professionInfoDao.updateProfessionInfo(professionInfo);
	}
	public int delProfessionInfo(String ZYDM) {
		return professionInfoDao.delProfessionInfo(ZYDM);
	}
	public int delAll(String[] ids) {
		return professionInfoDao.delAll(ids);
	}

}
